file_decrypt
This function decrypts a file previously encrypted by file_encrypt.
bool file_decrypt(string input_file, string output_file, string encryption_key)
Parameters:
input_file
The name of the file to decrypt.
output_file
The name of the file that will contain the decrypted data.
encryption_key
The key that will be used to decrypt the data. This must be the same key given when the file was encrypted.
Return value:
true if the file was successfully decrypted, false otherwise.
Remarks:
None.
Example:
// Decrypt a sound file and play it.
sound test;
void main()
{
if(!file_exists("test.dat"))
{
alert("Error", "Cannot find test.dat.");
return;
}
if(!file_decrypt("test.dat", "test.wav", "you_are_not_hacking_into_me"))
{
alert("Error", "Could not decrypt test.dat.");
return;
}
test.load("test.wav");
if(test.active==false)
{
alert("Error", "Cannot play decrypted sound. errorcode="+error);
return;
}
test.play_wait();
}